/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.sinosoft.call.controller;

import com.alibaba.fastjson.JSONObject;
import com.sinosoft.call.service.BaseCallService;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * @author root
 */
@RestController
public class TestCallController {
    
    @Autowired
    BaseCallService cs;
    
    @RequestMapping(value = "/testcall", method = {RequestMethod.POST, RequestMethod.GET})
    public JSONObject testcall(@RequestBody JSONObject param, HttpServletRequest request) {
        
        return cs.callService(param.getString("code"), param);
    }
}
